#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Farmer Li, 公众号: 很酷的程序员/RealCoolEngineer
# @Date: 2021-04-17
# @Question: https://www.zhihu.com/question/453997983

import click
import pandas as pd


def save_columns_to(src_file, dst_file, columns=None):
    df = pd.read_csv(src_file)
    df[columns].to_csv(dst_file, index=None)


@click.command()
@click.argument('src-file')
@click.argument('dst-file')
def main(src_file, dst_file):
    columns = ['a', 'b']
    save_columns_to(src_file, dst_file, columns)


if __name__ == '__main__':
    main()
